package com.mysql.work.controller;


import com.mysql.work.entity.Order;
import com.mysql.work.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderMapper orderMapper;

    @RequestMapping("/insert")
    public String insert(Order order){
        orderMapper.insert(order);
        return "sucess";
    }

    @RequestMapping("/findAll")
    public List<Order> findAll(){
//        return orderMapper.;
        return null;
    }


}
